package cn.hnkjxy.service.impl;

import java.util.List;

import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.hnkjxy.dao.OrderDao;
import cn.hnkjxy.po.Order;
import cn.hnkjxy.service.OrderService;

@Service
@Transactional
public class OrderServiceImpl implements OrderService {
	@Autowired
	private OrderDao orderdao;

	@Override
	public List<Order> findUserOrder(Integer id) {
		return this.orderdao.findUserOrder(id);
	}

	@Override
	public Integer addOrder(Order order) {
		Integer row = this.orderdao.addOrder(order);
		return row;
	}

	@Override
	public Integer deleteOrder(Integer id) {
		Integer row = this.orderdao.deleteOrder(id);
		return row;
	}
	@Override
	public Integer deleteOrderByUser(Integer usid) {
		Integer row = this.orderdao.deleteOrderByUser(usid);
		return row;
	}

	@Override
	public List<Order> findByOrder(String name,String tel,Integer orid,Integer usid) {
		return this.orderdao.findByOrder(name, tel, orid, usid);
	}

	@Override
	public List<Order> findAllOrder() {
		return this.orderdao.findAllOrder();
	}

	@Override
	public List<Order> findByAdminOrder(String name, String number, Integer prid) {
		return this.orderdao.findByAdminOrder(name, number, prid);
	}

	@Override
	public Integer deleteByAdminOrder(Integer id) {
		Integer row=this.orderdao.deleteByAdminOrder(id);
		return row;
	}

	@Override
	public List<Order> findOrderData() {
		return this.orderdao.findOrderData();
	}
	
	
}
